<template>
  <div class="nav">
    <tab v-model="index01" active-color="#FF933C" bar-active-color="#FF933C" :line-width="2" >
      <tab-item  active-class="actives" @on-before-index-change="switchTabItem" @on-item-click="handler(index)" v-for="(items,index) of catelist" :key="index" :selectid="index == items"  > {{items.CateName}}</tab-item>
    </tab>
  </div>
</template>

<script>
import { Tab, TabItem } from 'vux'
export default {
  name: 'tabList',
  props: {
    catelist: Array,
    selectid: Number,
    index01: Number
  },
  data () {
    return {
    }
  },
  components: {
    Tab,
    TabItem
  },
  created () {
  },
  methods: {
    handler (index) {
      console.log(index)
      this.$emit('tabselect', index)
    },
    switchTabItem (e) {
      console.log(e)
    }
  }
}
</script>

<style lang="" scoped>
  .actives{
    color: #E37713;
  }
</style>
